package com.ifcar.app.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class UList extends Base {

	
	private static final long serialVersionUID = 2136592258150725245L;

	
	public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException {
		
		HttpServletRequest req = (HttpServletRequest) request;
		HttpServletResponse resp = (HttpServletResponse) response;
		req.setCharacterEncoding("UTF-8");
		String content = "";
		String method = req.getParameter("method");
		
		if ("yes".equals(method)) {
			content = yes(req,resp);
			sendContent(resp, content, CONTEXT_TYPE);
		}else if ("no".equals(method)) {
			content = no(req,resp);
			sendContent(resp, content, CONTEXT_TYPE);
		}else if("fri".equals(method)){
			content = fri(req,resp);
			sendContent(resp, content, CONTEXT_TYPE);
		}else{
			
			_404Content(resp);
			
		}
		
		return;
	}
	
	
	/**
	 * 有车用户列表
	 * @param request
	 * @param response
	 * @return
	 */
	private String yes(ServletRequest request, ServletResponse response){
		
		return "{}";
	}
	
	/**
	 * 无车用户列表
	 * @param request
	 * @param response
	 * @return
	 */
	private String no(ServletRequest request, ServletResponse response){
		
		return "{}";
	}
	
	
	/**
	 * 我的好友列表
	 * @param request
	 * @param response
	 * @return
	 */
	private String fri(ServletRequest request, ServletResponse response){
		
		return "{}";
	}
	
}
